<template>
    <div>
        <ul style="font-size:12px; color:#666666">
            <li style="height:30px;line-height:30px"><span>申请售后时间：&nbsp;&nbsp;</span><span>{{time}}</span></li>
            <li style="height:30px;line-height:30px;position:relative"><span>申请售后编号：&nbsp;&nbsp;</span><span>{{code}}</span>
                <span style="position:absolute;display:none;background:rgba(0,0,0,.4);left: 0; right: 0; margin-left: auto; margin-right: auto; color:#fff" class="copyTip">已复制</span>
                <mu-button color="#ffffff" v-clipboard:copy="code" v-clipboard:success="onCopy" textColor="#333333" :ripple=false :flat=true style="border:1px solid #333333;border-radius: 5px;height:20px;width:50px;padding:0px;float:right;">复制</mu-button></li>
        </ul>
    </div>  
</template>
<script>
export default {
    name:'serverList',
    data () {
        return {
            
        }
    },
    props:['code','time'],
    computed:{
        
    },
    methods:{
        onCopy: function (e) {
            // var copyTip=document.getElementsByClassName('copyTip')[0];
            // console.log(copyTip,document.getElementsByClassName('copyTip'));
            // copyTip.style.display='block';
            // setTimeout(function(){
            //     copyTip.style.display='none';
            // },1000)
        },
        onError: function (e) {
            alert('复制失败')
        }
    },
}
</script>
<style lang='scss'>
    .mu-flat-button{
        min-width: auto;
    }
    .mu-flat-button .mu-button-wrapper{
        padding:0px;
    }
</style>